/*
 * This source code is part of TWaver 4.0
 *
 * Serva Software PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 * Copyright 2002 - 2011 Serva Software. All rights reserved.
 */

package demo.chart.attachment.chartattachment;

import java.util.List;

import twaver.chart.AbstractChart;
import twaver.chart.AbstractScaleChart;
import twaver.network.ui.ElementUI;

public abstract class ScaleElementAttachment extends ElementAttachment {

	public final static String XSCALETEXTLIST = "scaleelementattribute.xscaletextlist";

	public ScaleElementAttachment(String name, ElementUI ui) {
		super(name, ui);
	}

	public ScaleElementAttachment(String name, ElementUI ui, boolean minimized, boolean shrinked) {
		super(name, ui, minimized, shrinked);
	}

	protected void setChartProperty(AbstractChart chart) {
		AbstractScaleChart scaleChart = (AbstractScaleChart) chart;
		Object object = element.getClientProperty(XSCALETEXTLIST);
		if (object != null) {
			scaleChart.setXScaleTextList((List) object);
		}
		super.setChartProperty(chart);
	}
}